package cn.tedu.zx.common.exception;

import cn.tedu.zx.common.restful.ResponseCode;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.extern.slf4j.Slf4j;

/**
 * 业务异常
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Slf4j
public class ServiceException extends RuntimeException {

    private ResponseCode responseCode;



    public ServiceException(ResponseCode responseCode, String message) {
        super(message);
        setResponseCode(responseCode);
        log.info("进入全局异常处理{}，{}",responseCode,message);
    }

}
